<!--
  Generated template for the Readnotice page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>内部签报</ion-title>
    <ion-buttons end>
      <button ion-button icon-only (click)="dosearch()">
        <ion-icon name="search"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
  <ion-toolbar no-border-top class="white">
    <ion-segment [(ngModel)]="selectIndex" (ionChange)="segmentChanged($event)">
      <ion-segment-button value="0">
        待办
      </ion-segment-button>
      <ion-segment-button value="1">
        已办
      </ion-segment-button>
    </ion-segment>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content></ion-refresher-content>
  </ion-refresher>
  <div [ngSwitch]="selectIndex">
    <div *ngSwitchCase="0">
      <ion-list class="search">
        <ion-item *ngFor="let item of listItems1" tappable (click)="dodetail(item)">
          <div>标题：{{item.title}}</div>
          <div>紧急程度：{{item.urgencyLevel}}&nbsp;&nbsp;&nbsp;&nbsp;请示类别：{{item.requestType}}</div>
          <div>办理时限：{{item.dealWithTimeLimit}}</div>
          <div>创建时间：{{item.createDate}}</div>
        </ion-item>
      </ion-list>
      <div class="nodata" *ngIf="listItems1.length == 0">找不到您要的数据哦^</div>
    </div>
    <div *ngSwitchCase="1">
      <ion-list class="search">
        <ion-item *ngFor="let item of listItems2" tappable (click)="dodetail(item)">
          <div>标题：{{item.title}}</div>
          <div>紧急程度：{{item.urgencyLevel}}&nbsp;&nbsp;&nbsp;&nbsp;请示类别：{{item.requestType}}</div>
          <div>办理时限：{{item.dealWithTimeLimit}}</div>
          <div>创建时间：{{item.createDate}}</div>
        </ion-item>
      </ion-list>
      <div class="nodata" *ngIf="listItems2.length == 0">找不到您要的数据哦^</div>
    </div>
  </div>
  <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>